cmake_minimum_required(VERSION 3.10)

project(task-5--serial)

add_library(serial SHARED SerialPort.cpp)

target_include_directories(serial PUBLIC SerialPort.h)

add_executable(task5 main.cpp)

target_link_libraries(task5 serial)

set_target_properties(task5 PROPERTIES #查询的目标链接pthread库的方案
COMPILE_FLAGS "-pthread"
LINK_FLAGS "-pthread")